package data;

public class CarrierType {

	// nazwa
	private String name;
	// max waga i pole podstawy
	private int maxWeight, fieldBase;
	// wysokosc modulu i maksymalna wysokosc calosci
	private float moduleHeight, maxHeight;

	private int maxModules;

	/**
	 * @param name
	 * @param maxWeight
	 * @param fieldBase
	 * @param moduleHeight
	 * @param maxHeight
	 */
	public CarrierType(String name, String fieldBase, String moduleHeight,
			String maxHeight, String maxWeight) {
		this.name = name;
		this.maxWeight = Integer.parseInt(maxWeight);
		this.fieldBase = Integer.parseInt(fieldBase);
		this.moduleHeight = Float.parseFloat(moduleHeight);
		this.maxHeight = Float.parseFloat(maxHeight);
		this.maxModules = (int) (this.maxHeight / this.moduleHeight);
	}

	public int getMaxModules() {
		return maxModules;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the maxWeight
	 */
	public int getMaxWeight() {
		return maxWeight;
	}

	/**
	 * @return the fieldBase
	 */
	public int getFieldBase() {
		return fieldBase;
	}

	/**
	 * @return the moduleHeight
	 */
	public float getModuleHeight() {
		return moduleHeight;
	}

	/**
	 * @return the maxHeight
	 */
	public float getMaxHeight() {
		return maxHeight;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "CarrierType [name=" + name + ", maxWeight=" + maxWeight
				+ ", fieldBase=" + fieldBase + ", moduleHeight=" + moduleHeight
				+ ", maxHeight=" + maxHeight + "]";
	}
}
